package com.fastCms.business.frame.busi;

import com.fastCms.business.frame.exception.BusinessException;
import com.fastCms.business.frame.pojo.po.ValidateCodeCheckPO;
import com.fastCms.business.frame.pojo.po.ValidateCodeSendPO;
import com.fastCms.business.frame.pojo.po.ValidateEmailSendPO;
import com.fastCms.business.frame.response.ApiResponse;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 哈密瓜科技 版权所有 © Copyright 2019<br>
 *
 * @Description: 登录权限控制<br>
 * @Project: hami <br>
 * @CreateDate: Created in 2019/3/7 下午3:48 <br>
 * @Author: <a href="lsquan666@163.com">lsquan</a>
 */
public interface ValidateManageService {

    /**
     * 获取图片验证码
     *
     * @param response
     * @param request
     * @return
     * @throws IOException
     */
    String getPicValidateCode(HttpServletResponse response, HttpServletRequest request) throws IOException;

    /**
     * 校验图片验证码
     *
     * @param request
     * @param validCode
     * @return
     */
    ApiResponse<Boolean> checkPicValidateCode(HttpServletRequest request, String validCode);

    /**
     * 发送短信验证码
     *
     * @param param
     * @return
     */
    public ApiResponse<Boolean> smsSendValidateCode(ValidateCodeSendPO param);

    /**
     * 校验短信验证码
     *
     * @param param
     * @return
     */
    public ApiResponse<Boolean> checkSmsValidateCode(ValidateCodeCheckPO param);


    public ApiResponse<Boolean> sendEmailCode(ValidateEmailSendPO param) throws BusinessException;


    public ApiResponse<Boolean> checkEmailCode(ValidateEmailSendPO param);

}
